<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>查看图片 | 学术海报生成器</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">
    <style>
        body {
            background-color: #000;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        .image-container {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        img {
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
        }
        .controls {
            position: fixed;
            top: 10px;
            right: 10px;
            z-index: 1000;
        }
        .btn {
            margin: 5px;
        }
    </style>
</head>
<body>
    <div class="controls">
        <a href="/" class="btn btn-primary">返回主页</a>
        <a href="/download/{{ filename }}" class="btn btn-success">下载图片</a>
    </div>
    
    <div class="image-container">
        <img src="/output/{{ filename }}" alt="图片预览">
    </div>
</body>
</html>